<?php
// +----------------------------------------------------------------------
// | ZGUAN [ 致力于帮助更多的中小企业物联网转型 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2024 https://www.zguan.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ZGUAN 并不是自由软件，未经许可不能去掉ZGUAN 相关版权
// +----------------------------------------------------------------------
// | Author: ZGUAN Team <admin@zguan.cn>  0769-82282996  15899929162
// +----------------------------------------------------------------------
use think\facade\Route;


$propertyRoute = function () {
    ##  后台登录 不验证权限
    Route::group('login', function () {
        Route::get('index', 'Login/index')->name('propertyUserLogin')->middleware(\app\http\middleware\property\CheckLogin::class, false);
        Route::post('doLogin', 'Login/doLogin')->name('propertyUserDoLogin');
    })->prefix('property.');

    ## 验证登录 add
    Route::group('', function () {
        Route::get('/', 'Index/index')->name('propertyIndex');
        Route::group('index', function () {
            Route::get('welcome', 'Index/welcome')->name('propertyIndexWelcome');
            Route::get('getMenu', 'Index/getMenu')->name('propertyIndexGetMenu');
            Route::get('clearCache', 'Index/clearCache')->name('propertyIndexClearCache');
            Route::post('signOut', 'Index/signOut')->name('propertyLoginOut');
        });

        ## 验证权限 add
        Route::group('', function () {

            Route::group('upload', function () {
                Route::group('config', function () {
                    Route::rule('configUpdate', '/configUpdate')->name('propertyUploadConfigUpdate');
                })->prefix('property.upload.UploadConfig');#文件参数
                Route::group('group', function () {
                    Route::get('list', '/list')->name('propertyUploadGroupList');
                    Route::rule('add', '/add')->name('propertyUploadGroupAdd');
                    Route::rule('edit', '/edit')->name('propertyUploadGroupEdit');
                    Route::post('del', '/del')->name('propertyUploadGroupDel');
                })->prefix('property.upload.UploadGroup');#文件分组管理
                Route::group('file', function () {
                    Route::get('uploadFileList', '/uploadFileList')->name('propertyUploadFileList');
                    Route::post('uploadImageAdd', '/uploadImageAdd')->name('propertyUploadFileAdd');
                    Route::rule('uploadFileEdit', '/uploadFileEdit')->name('propertyUploadFileEdit');
                    Route::post('uploadFiledDel', '/uploadFiledDel')->name('propertyUploadFileDel');
                    Route::post('uploadFileMove', '/uploadFileMove')->name('propertyUploadFileMoved');##移动
                })->prefix('property.upload.UploadFile');#文件管理
            });
            Route::group('sms', function () {
                Route::group('config', function () {
                    Route::rule('configUpdate', '/configUpdate')->name('propertySmsConfigUpdate');
                })->prefix('property.system.sms.SmsConfig');#短信参数
                Route::group('log', function () {
                    Route::get('list', '/list')->name('propertySmsLogList');
                    Route::post('del', '/del')->name('propertySmsLogDel');
                })->prefix('property.system.sms.SmsLog');#发送日志
                Route::group('template', function () {
                    Route::get('list', '/list')->name('propertySmsTemplateList');
                    Route::rule('add', '/add')->name('propertySmsTemplateAdd');
                    Route::rule('edit', '/edit')->name('propertySmsTemplateEdit');
                    Route::post('del', '/del')->name('propertySmsTemplateDel');
                    Route::post('testSend', '/testSend')->name('propertySmsTemplateSend');
                })->prefix('property.system.sms.SmsTemplate');#短信模板
            });
            Route::group('system', function () {
                Route::group('config', function () {
                    Route::rule('programInfo', '/programInfo')->name('propertyProgramInfoInfo');
                })->prefix('property.system.SystemConfig');#参数配置
                Route::group('pact', function () {
                    Route::get('list', '/list')->name('propertySystemPactList');
                    Route::rule('add', '/add')->name('propertySystemPactAdd');
                    Route::rule('edit', '/edit')->name('propertySystemPactEdit');
                    Route::post('del', '/del')->name('propertySystemPactDel');
                })->prefix('property.system.SystemPact');#协议
            });
            Route::group('property', function () {
                Route::group('basic', function () {
                    Route::rule('configProperty', '/configProperty')->name('propertyConfigUpdate');
                })->prefix('property.property.basic.PropertyBasic');#基本参数
                Route::group('group', function () {
                    Route::get('list', '/list')->name('propertyGroupList');
                    Route::rule('add', '/add')->name('propertyGroupAdd');
                    Route::rule('edit', '/edit')->name('propertyGroupEdit');
                    Route::post('del', '/del')->name('propertyGroupDel');
                    Route::rule('detail', '/detail')->name('propertyGroupDetail');
                })->prefix('property.property.users.PropertyGroup');#组织架构
                Route::group('users', function () {
                    Route::get('list', '/list')->name('propertyUsersList');
                    Route::rule('add', '/add')->name('propertyUsersAdd');
                    Route::rule('edit', '/edit')->name('propertyUsersEdit');
                    Route::post('del', '/del')->name('propertyUsersDel');
                    Route::rule('editInfo', '/editInfo')->name('propertyEditSelfInfo');## 修改个人信息
                    Route::rule('editPassword', '/editPassword')->name('propertyEditSelfPassword'); ## 修改登录密码
                    Route::rule('detail', '/detail')->name('propertyUsersDetail');
                })->prefix('property.property.users.PorpertyUsers');#用户档案
                Route::group('access', function () {
                    Route::get('list', '/list')->name('propertyUsersRoleList');
                    Route::rule('add', '/add')->name('propertyUsersRoleAdd');
                    Route::rule('edit', '/edit')->name('propertyUsersRoleEdit');
                    Route::post('del', '/del')->name('propertyUsersRoleDel');
                })->prefix('property.auth.PropertyAuthAccess');#用户角色
                Route::group('usersLog', function () {
                    Route::get('list', '/list')->name('propertyUsersLogList');
                    Route::rule('edit', '/edit')->name('propertyUsersLogEdit');
                    Route::post('del', '/del')->name('propertyUsersLogDel');
                })->prefix('property.property.users.PropertyUsersLog');#用户访问日志
            });
            Route::group('auth', function () {
                Route::group('authRule', function () {
                    Route::get('list', '/list')->name('propertyAuthRuleList');
                    Route::rule('add', '/add')->name('propertyAuthRuleAdd');
                    Route::rule('edit', '/edit')->name('propertyAuthRuleEdit');
                    Route::post('del', '/del')->name('propertyAuthRuleDel');
                })->prefix('property.auth.PropertyAuthRule');#权限
                Route::group('authRole', function () {
                    Route::get('list', '/list')->name('propertyAuthRoleList');
                    Route::rule('add', '/add')->name('propertyAuthRoleAdd');
                    Route::rule('edit', '/edit')->name('propertyAuthRoleEdit');
                    Route::post('del', '/del')->name('propertyAuthRoleDel');
                    Route::rule('detail', '/detail')->name('propertyAuthRoleDetail');
                })->prefix('property.auth.PropertyAuthRole');#角色
            });
            #公告管理 add
            Route::group('affiche', function () {##公告管理 add
                Route::group('affiche', function () {
                    Route::get('list', '/list')->name('propertySystemAfficheList');##
                    Route::rule('add', '/add')->name('propertySystemAfficheAdd');##
                    Route::rule('edit', '/edit')->name('propertySystemAfficheEdit');##
                    Route::rule('del', '/del')->name('propertySystemAfficheDel');##
                    Route::rule('detail', '/detail')->name('propertySystemAfficheDetail');
                    Route::post('status', '/switchStatus')->name('propertySystemAfficheShow');##
                    Route::post('placedTop', '/placedTop')->name('propertySystemAfficheTop');##
                })->prefix('property.system.affiche.Affiche');
                Route::group('afficheCate', function () {
                    Route::get('list', '/list')->name('propertySystemAfficheCateList');##
                    Route::rule('add', '/add')->name('propertySystemAfficheCateAdd');##
                    Route::rule('edit', '/edit')->name('propertySystemAfficheCateEdit');##
                    Route::rule('del', '/del')->name('propertySystemAfficheCateDel');##
                    Route::rule('detail', '/detail')->name('propertySystemAfficheCateDetail');
                })->prefix('property.system.affiche.AfficheCate');
            });
            #公告管理 end
            # 资讯管理 add
            Route::group('article', function () {
                Route::group('single', function () {
                    Route::get('list', '/list')->name('propertyArticleSingleList');
                    Route::rule('add', '/add')->name('propertyArticleSingleAdd');
                    Route::rule('edit', '/edit')->name('propertyArticleSingleEdit');
                    Route::rule('del', '/del')->name('propertyArticleSingleDel');
                    Route::rule('detail', '/detail')->name('propertyArticleSingleDetail');
                    Route::post('status', '/switchStatus')->name('propertyArticleSingleShow');
                    Route::post('placedTop', '/placedTop')->name('propertyArticleSingleTop');
                })->prefix('property.article.single.ArticleSingle');
                Route::group('news', function () {
                    Route::get('list', '/list')->name('propertyArticleNewsList');
                    Route::rule('add', '/add')->name('propertyArticleNewsAdd');
                    Route::rule('edit', '/edit')->name('propertyArticleNewsEdit');
                    Route::rule('del', '/del')->name('propertyArticleNewsDel');
                    Route::rule('detail', '/detail')->name('propertyArticleNewsDetail');
                    Route::post('status', '/switchStatus')->name('propertyArticleNewsShow');
                    Route::post('placedTop', '/placedTop')->name('propertyArticleNewsTop');
                })->prefix('property.article.news.ArticleNews');
                Route::group('newsCate', function () {##资讯管理
                    Route::get('list', '/list')->name('propertyArticleNewsCateList');
                    Route::rule('add', '/add')->name('propertyArticleNewsCateAdd');
                    Route::rule('edit', '/edit')->name('propertyArticleNewsCateEdit');
                    Route::rule('del', '/del')->name('propertyArticleNewsCateDel');
                    Route::rule('detail', '/detail')->name('propertyArticleNewsCateDetail');
                })->prefix('property.article.news.ArticleNewsCate');

                Route::group('faq', function () {## 常见问题
                    Route::rule('list', '/list')->name('propertyArticleFaqList');
                    Route::rule('add', '/add')->name('propertyArticleFaqAdd');
                    Route::rule('edit', '/edit')->name('propertyArticleFaqEdit');
                    Route::post('del', '/del')->name('propertyArticleFaqDel');
                    Route::rule('detail', '/detail')->name('propertyArticleFaqDetail');
                    Route::post('placedTop', '/placedTop')->name('propertyArticleFaqTop');
                    Route::post('switchStatus', '/switchStatus')->name('propertyArticleFaqShow');
                })->prefix('property.article.faq.ArticleFaq');
                Route::group('faqCate', function () {## 常见问题
                    Route::get('list', '/list')->name('propertyArticleFaqCateList');
                    Route::rule('add', '/add')->name('propertyArticleFaqCateAdd');
                    Route::rule('edit', '/edit')->name('propertyArticleFaqCateEdit');
                    Route::rule('del', '/del')->name('propertyArticleFaqCateDel');
                    Route::rule('detail', '/detail')->name('propertyArticleFaqCateDetail');
                })->prefix('property.article.faq.ArticleFaqCate');
                Route::group('guide', function () {
                    Route::rule('list', '/list')->name('propertyArticleGuideList');
                    Route::rule('add', '/add')->name('propertyArticleGuideAdd');
                    Route::rule('edit', '/edit')->name('propertyArticleGuideEdit');
                    Route::post('del', '/del')->name('propertyArticleGuideDel');
                    Route::rule('detail', '/detail')->name('propertyArticleGuideDetail');
                    Route::post('placedTop', '/placedTop')->name('propertyArticleGuideTop');
                    Route::post('switchStatus', '/switchStatus')->name('propertyArticleGuideShow');
                })->prefix('property.article.guide.ArticleGuide');
                Route::group('guideCate', function () {#
                    Route::get('list', '/list')->name('propertyArticleGuideCateList');
                    Route::rule('add', '/add')->name('propertyArticleGuideCateAdd');
                    Route::rule('edit', '/edit')->name('propertyArticleGuideCateEdit');
                    Route::rule('del', '/del')->name('propertyArticleGuideCateDel');
                    Route::rule('detail', '/detail')->name('propertyArticleGuideCateDetail');
                })->prefix('property.article.guide.ArticleGuideCate');
            });
            # 资讯管理 end
            # 物业管理 add
            Route::group('property', function () {
                Route::group('cate', function () {
                    Route::get('list', '/list')->name('propertyCateList');
                    Route::rule('add', '/add')->name('propertyCateAdd');
                    Route::rule('edit', '/edit')->name('propertyCateEdit');
                    Route::rule('del', '/del')->name('propertyCateDel');
                    Route::rule('detail', '/detail')->name('propertyCateDetail');
                })->prefix('property.property.basic.PropertyCate');
                Route::group('basic', function () {
                    Route::get('list', '/list')->name('propertyBasicList');
                    Route::rule('add', '/add')->name('propertyBasicAdd');
                    Route::rule('edit', '/edit')->name('propertyBasicEdit');
                    Route::post('del', '/del')->name('propertyBasicDel');
                    Route::rule('detail', '/detail')->name('propertyBasicDetail');
                    Route::rule('propertyLog', '/propertyLog')->name('propertyLogList');
                })->prefix('property.property.basic.PropertyBasic');
                Route::group('label', function () {
                    Route::get('list', '/list')->name('propertyLabelList');
                    Route::rule('add', '/add')->name('propertyLabelAdd');
                    Route::rule('edit', '/edit')->name('propertyLabelEdit');
                    Route::rule('del', '/del')->name('propertyLabelDel');
                    Route::rule('detail', '/detail')->name('propertyLabelDetail');
                })->prefix('property.property.basic.PropertyLabel');
                Route::group('unit', function () {
                    Route::get('list', '/list')->name('propertyUnitList');
                    Route::rule('add', '/add')->name('propertyUnitAdd');
                    Route::rule('edit', '/edit')->name('propertyUnitEdit');
                    Route::rule('del', '/del')->name('propertyUnitDel');
                    Route::rule('detail', '/detail')->name('propertyUnitDetail');
                })->prefix('property.property.basic.PropertyUnit');
                Route::group('facility', function () {
                    Route::get('list', '/list')->name('propertyFacilityList');
                    Route::rule('add', '/add')->name('propertyFacilityAdd');
                    Route::rule('edit', '/edit')->name('propertyFacilityEdit');
                    Route::rule('del', '/del')->name('propertyFacilityDel');
                })->prefix('property.property.basic.PropertyFacility');
                ##物业账单管理 add
                Route::group('bill', function () {
                    Route::group('day', function () {
                        Route::get('list', '/list')->name('propertyBillDayList');##
                        Route::rule('add', '/add')->name('propertyBillDayAdd');##
                        Route::rule('edit', '/edit')->name('propertyBillDayEdit');##
                        Route::rule('detail', '/detail')->name('propertyBillDayDetail');##
                        Route::post('del', '/del')->name('propertyBillDayDel');##
                    })->prefix('property.property.bill.PropertyBillDay');
                    Route::group('month', function () {
                        Route::get('list', '/list')->name('propertyBillMonthList');##
                        Route::rule('add', '/add')->name('propertyBillMonthAdd');##
                        Route::rule('edit', '/edit')->name('propertyBillMonthEdit');##
                        Route::rule('detail', '/detail')->name('propertyBillMonthDetail');##
                        Route::post('del', '/del')->name('propertyBillMonthDel');##
                    })->prefix('property.property.bill.PropertyBillMonth');
                });
            });
            # 物业管理 end
            # 房间管理 add
            Route::group('room', function () {
                Route::group('basic', function () {
                    Route::get('list', '/list')->name('propertyRoomBasicList');
                    Route::rule('add', '/add')->name('propertyRoomBasicAdd');
                    Route::rule('copy', '/copy')->name('propertyRoomBasicCopy');
                    Route::rule('edit', '/edit')->name('propertyRoomBasicEdit');
                    Route::post('del', '/del')->name('propertyRoomBasicDel');
                    Route::rule('detail', '/detail')->name('propertyRoomBasicDetail');
                    Route::rule('roomLog', '/roomLog')->name('propertyRoomLogList');##
                    Route::rule('bindEnergyMeter', '/bindEnergyMeter')->name('propertyRoomBindEnergyMeter');##绑定能源设备
                    Route::rule('unbindEnergyMeter', '/unbindEnergyMeter')->name('propertyRoomUnbindEnergy');##解除能源设备
                })->prefix('property.room.RoomBasic');
                Route::group('label', function () {
                    Route::get('list', '/list')->name('propertyRoomLabelList');
                    Route::rule('add', '/add')->name('propertyRoomLabelAdd');
                    Route::rule('edit', '/edit')->name('propertyRoomLabelEdit');
                    Route::rule('del', '/del')->name('propertyRoomLabelDel');
                    Route::rule('detail', '/detail')->name('propertyRoomLabelDetail');
                })->prefix('property.room.RoomLabel');
            });
            # 房间管理 end
            # 房源管理 add
            Route::group('housing', function () {
                Route::group('resource', function () {
                    Route::get('list', '/list')->name('propertyHousingResourceList');
                    Route::rule('add', '/add')->name('propertyHousingResourceAdd');
                    Route::rule('edit', '/edit')->name('propertyHousingResourceEdit');
                    Route::rule('del', '/del')->name('propertyHousingResourceDel');
                    Route::rule('resourceLog', '/resourceLog')->name('propertyResourceLogList');##
                    Route::rule('detail', '/detail')->name('propertyHousingResourceDetail');
                })->prefix('property.housing.HousingResource');
                Route::group('make', function () {
                    Route::get('list', '/list')->name('propertyHousingMakeList');
                    Route::rule('add', '/add')->name('propertyHousingMakeAdd');
                    Route::rule('edit', '/edit')->name('propertyHousingMakeEdit');
                    Route::rule('del', '/del')->name('propertyHousingMakeDel');
                })->prefix('property.housing.HousingMake');
                Route::group('label', function () {
                    Route::get('list', '/list')->name('propertyHousingLabelList');
                    Route::rule('add', '/add')->name('propertyHousingLabelAdd');
                    Route::rule('edit', '/edit')->name('propertyHousingLabelEdit');
                    Route::rule('del', '/del')->name('propertyHousingLabelDel');
                    Route::rule('detail', '/detail')->name('propertyHousingLabelDetail');
                })->prefix('property.housing.HousingLabel');
            });
            # 房源管理 end
            # 合同管理 add
            Route::group('contract', function () {
                Route::group('basic', function () {
                    Route::get('list', '/list')->name('propertyContractBasicList');
                    Route::rule('add', '/add')->name('propertyContractBasicAdd');
                    Route::rule('edit', '/edit')->name('propertyContractBasicEdit');
                    Route::post('del', '/del')->name('propertyContractBasicDel');
                    Route::rule('detail', '/detail')->name('propertyContractBasicDetail');
                    Route::rule('auditContract', '/auditContract')->name('propertyContractBasicAudit');#审核
                    Route::rule('extendContract', '/extendContract')->name('propertyContractBasicExtend');#续租
                    Route::rule('renunContract', '/renunContract')->name('propertyContractBasicRenun');#退租
                    Route::rule('roomBound', '/roomBound')->name('propertyContractRoomBound');##关联房间
                    Route::rule('roomRelieve', '/roomRelieve')->name('propertyContractRoomRelieve');##解除房间
                    Route::rule('contractLog', '/contractLog')->name('propertyContractLogList');
                })->prefix('property.contract.ContractBasic');
                Route::group('lessee', function () {
                    Route::get('list', '/list')->name('propertyContractLesseeList');
                    Route::rule('add', '/add')->name('propertyContractLesseeAdd');
                    Route::rule('edit', '/edit')->name('propertyContractLesseeEdit');
                    Route::post('del', '/del')->name('propertyContractLesseeDel');
                    Route::rule('detail', '/detail')->name('propertyContractLesseeDetail');
                })->prefix('property.contract.ContractLessee');
                Route::group('bill', function () {
                    Route::get('list', '/list')->name('propertyContractBillList');##
                    Route::rule('add', '/add')->name('propertyContractBillAdd');##
                    Route::rule('edit', '/edit')->name('propertyContractBillEdit');##
                    Route::post('del', '/del')->name('propertyContractBillDel');##
                })->prefix('property.contract.ContractBill');
            });
            # 合同管理 end
            # 账单管理 add
            Route::group('bill', function () {
                Route::group('cate', function () {
                    Route::get('list', '/list')->name('propertyBillCateList');##
                    Route::rule('add', '/add')->name('propertyBillCateAdd');##
                    Route::rule('edit', '/edit')->name('propertyBillCateEdit');##
                    Route::rule('del', '/del')->name('propertyBillCateDel');##
                    Route::rule('detail', '/detail')->name('propertyBillDetail');##
                    Route::rule('postpone', '/detail')->name('propertyBillPostpone');#延期
                    Route::rule('invalid', '/detail')->name('propertyFirmBasicInvalid');#作废
                    Route::rule('payment', '/detail')->name('propertyFirmBasicPayment');#支付
                })->prefix('property.bill.BillCate');
                Route::group('basic', function () {
                    Route::get('list', '/list')->name('propertyBillBasicList');
                    Route::rule('add', '/add')->name('propertyBillBasicAdd');
                    Route::rule('edit', '/edit')->name('propertyBillBasicEdit');
                    Route::post('del', '/del')->name('propertyBillBasicDel');
                    Route::rule('detail', '/detail')->name('propertyBillBasicDetail');

                    Route::get('stayAuditList', '/stayAuditList')->name('propertyBillStayAuditList');## 待审核
                    Route::get('stayPaymentList', '/stayPaymentList')->name('propertyBillStayPaymentList');## 待支付
                    Route::get('overdueList', '/overdueList')->name('propertyBillOverdueList');## 已逾期
                    Route::get('hasInvalidList', '/hasInvalidList')->name('propertyBillHasInvalidList');## 己作废
                    Route::get('hasSucceedList', '/hasSucceedList')->name('propertyBillHasSucceedList');## 己完成

                    Route::post('auditAdd', '/auditAdd')->name('propertyBillAuditSubmit');## 审核
                    Route::rule('paymentAdd', '/paymentAdd')->name('propertyBillPaymentSubmit');## 支付
                    Route::post('urgeAdd', '/urgeAdd')->name('propertyBillUrgeSubmit');#催缴
                    Route::post('invalidAdd', '/invalidAdd')->name('propertyBillInvalidSubmit');## 作废
                    Route::post('postponeAdd', '/postponeAdd')->name('propertyBillPostponeSubmit');## 延期
                    Route::post('printAdd', '/printAdd')->name('propertyBillPrintSubmit');#打印
                    Route::post('exportAdd', '/exportAdd')->name('propertyBillExportSubmit');#导出
                    Route::post('createPdfAdd', '/createPdfAdd')->name('propertyBillPdfSubmit');#PDF

                    Route::rule('billLog', '/billLog')->name('propertyBillLogList');
                })->prefix('property.bill.BillBasic');

                Route::group('expend', function () {
                    Route::get('list', '/list')->name('propertyBillExpendList');## 支出账单管理
                    Route::rule('add', '/add')->name('propertyBillExpendAdd');
                    Route::rule('edit', '/edit')->name('propertyBillExpendEdit');
                    Route::post('del', '/del')->name('propertyBillExpendDel');
                    Route::rule('detail', '/detail')->name('propertyBillExpendDetail');
                    Route::get('stayPaymentList', '/stayPaymentList')->name('propertyBillExpendStayPayBillList');## 待支付账单
                })->prefix('property.bill.BillExpend');

                Route::group('catalog', function () {
                    Route::get('list', '/list')->name('propertyBillCatalogList');
                    Route::rule('addBasic', '/addBasic')->name('propertyBillCatalogAddBasic');
                    Route::rule('addOther', '/addOther')->name('propertyBillCatalogAddOther');
                    Route::rule('addWater', '/addWater')->name('propertyBillCatalogAddWater');
                    Route::rule('addReduced', '/addReduced')->name('propertyBillCatalogAddReduced');
                    Route::rule('addElectric', '/addElectric')->name('propertyBillCatalogAddElectric');
                    Route::rule('addEnergy', '/addEnergy')->name('propertyBillCatalogAddEnergy');
                    Route::rule('edit', '/edit')->name('propertyBillCatalogEdit');
                    Route::post('del', '/del')->name('propertyBillCatalogDel');
                    Route::rule('detail', '/detail')->name('propertyBillCatalogDetail');
                    Route::rule('paymentAdd', '/paymentAdd')->name('propertyBillCatalogPaymentSubmit');## 支付
                    Route::post('invalidAdd', '/invalidAdd')->name('propertyBillCatalogInvalidSubmit');## 作废
                    Route::rule('paymentCustomAdd', '/paymentCustomAdd')->name('propertyBillCatalogPaymentCustom');## 自动义支付
                    Route::get('stayPayBasicList', '/stayPayBasicList')->name('propertyBillBasicStayPayCatalogList');## 收入 待支付明细
                    Route::get('stayPayExpendList', '/stayPayExpendList')->name('propertyBillExpendStayPayCatalogList');## 支出 待支付明细
                })->prefix('property.bill.BillCatalog');

                Route::group('finance', function () {
                    Route::get('list', '/list')->name('propertyBillFinanceList');
                    Route::rule('add', '/add')->name('propertyBillFinanceAdd');
                    Route::rule('edit', '/edit')->name('propertyBillFinanceEdit');
                    Route::post('del', '/del')->name('propertyBillFinanceDel');
                    Route::rule('detail', '/detail')->name('propertyBillFinanceDetail');
                })->prefix('property.bill.BillFinance');

                Route::group('course', function () {
                    Route::get('list', '/list')->name('propertyBillCourseList');
                    Route::get('stayCheckList', '/stayCheckList')->name('propertyBillCourseStayCheckList');  ## 付款待确认
                    Route::get('stayAffirmList', '/stayAffirmList')->name('propertyBillCourseStayAffirmList');  ## 确认待对账
                    Route::rule('checkAdd', '/checkAdd')->name('propertyBillCourseCheck');  ## 确认
                    Route::rule('affirmAdd', '/affirmAdd')->name('propertyBillCourseAffirm');  ## 对账确认
                    Route::rule('detail', '/detail')->name('propertyBillCourseDetail');##详情
                })->prefix('property.bill.BillCourse');##流水记录
            });
            # 账单管理 end
            # 能耗管理 add
            Route::group('energy', function () {
                Route::group('qrcode', function () {##水表管理
                    Route::get('list', '/list')->name('propertyEnergyQrcodeList');##
                    Route::rule('add', '/add')->name('propertyEnergyQrcodeAdd');##
                    Route::rule('edit', '/edit')->name('propertyEnergyQrcodeEdit');##
                    Route::post('del', '/del')->name('propertyEnergyQrcodeDel');##
                })->prefix('property.energy.energyQrcode');
                Route::group('plan', function () {
                    Route::get('list', '/list')->name('propertyEnergyPlanList');##
                    Route::rule('add', '/add')->name('propertyEnergyPlanAdd');##
                    Route::rule('edit', '/edit')->name('propertyEnergyPlanEdit');##
                    Route::rule('del', '/del')->name('propertyEnergyPlanDel');##
                    Route::rule('detail', '/detail')->name('propertyEnergyPlanDetail');##
                })->prefix('property.energy.EnergyPlan');
                Route::group('meter', function () {
                    Route::get('list', '/list')->name('propertyEnergyMeterList');##
                    Route::rule('add', '/add')->name('propertyEnergyMeterAdd');##
                    Route::rule('edit', '/edit')->name('propertyEnergyMeterEdit');##
                    Route::rule('del', '/del')->name('propertyEnergyMeterDel');##
                    Route::rule('detail', '/detail')->name('propertyEnergyMeterDetail');##
                    Route::rule('meterLog', '/meterLog')->name('propertyEnergyMeterLogList');##
                    Route::rule('prepayList', '/prepayList')->name('propertyEnergyMeterPrepayList');## 预缴设备列表
                    Route::rule('recharge', '/recharge')->name('propertyEnergyMeterRecharge');## 充值
                    Route::rule('rechargeBatch', '/rechargeBatch')->name('propertyEnergyMeterRechargeBatch');## 批量充值
                    Route::rule('balanceLog', '/balanceLog')->name('propertyEnergyBalanceLogList');##充值日志
                    Route::rule('delMeterLog', '/delMeterLog')->name('propertyEnergyMeterLogDel');##设备日志
                    Route::rule('operateLog', '/operateLog')->name('propertyEnergyOperateLogList');##操作日志
                    Route::rule('delOperateLog', '/delOperateLog')->name('propertyEnergyOperateLogDel');##删除操作日志
                    Route::rule('dayMeterList', '/dayMeterList')->name('propertyEnergyMeterDayList');##
                    Route::rule('dayManuallyCopy', '/dayManuallyCopy')->name('propertyEnergyMeterDayManuallyCopy');##人工抄读【普通】
                    Route::rule('autoReadCopy', '/autoReadCopy')->name('propertyEnergyMeterAutoReadCopy');## 实时抄读【智能】
                    Route::rule('updateOnOff', '/updateOnOff')->name('propertyEnergyMeterUpdateOnOff');## 状态更新【智能】
                    Route::rule('onEnergyMeter', '/onEnergyMeter')->name('propertyEnergyMeterOn');## 合闸【智能】
                    Route::rule('offEnergyMeter', '/offEnergyMeter')->name('propertyEnergyMeterOff');## 拉闸【智能】
                    Route::rule('queryOperateResult', '/queryOperateResult')->name('propertyEnergyMeterOperateQueryResult');##智能设备结果回调【智能】
                })->prefix('property.energy.EnergyMeter');
                Route::group('users', function () {
                    Route::get('list', '/list')->name('propertyEnergyUsersList');##
                    Route::rule('add', '/add')->name('propertyEnergyUsersAdd');##
                    Route::rule('edit', '/edit')->name('propertyEnergyUsersEdit');##
                    Route::rule('del', '/del')->name('propertyEnergyUsersDel');##
                })->prefix('property.energy.EnergyUsers');
                Route::group('bill', function () {
                    Route::get('list', '/list')->name('propertyEnergyBillList');##
                    Route::rule('add', '/add')->name('propertyEnergyBillAdd');##
                    Route::rule('edit', '/edit')->name('propertyEnergyBillEdit');##
                    Route::rule('del', '/del')->name('propertyEnergyBillDel');##
                    Route::rule('detail', '/detail')->name('propertyEnergyBillDetail');##
                })->prefix('property.energy.EnergyBill');
                ## 公摊管理
                Route::group('shared', function () {
                    Route::group('plan', function () {
                        Route::get('list', '/list')->name('propertyEnergySharedPlanList');##
                        Route::rule('add', '/add')->name('propertyEnergySharedPlanAdd');##
                        Route::rule('edit', '/edit')->name('propertyEnergySharedPlanEdit');##
                        Route::rule('detail', '/detail')->name('propertyEnergySharedPlanDetail');##
                        Route::rule('del', '/del')->name('propertyEnergySharedPlanDel');##
                    })->prefix('property.energy.EnergySharedPlan');## 公摊方案管理
                    Route::group('room', function () {
                        Route::get('list', '/list')->name('propertyEnergySharedRoomList');##
                        Route::rule('add', '/add')->name('propertyEnergySharedRoomAdd');##
                        Route::rule('edit', '/edit')->name('propertyEnergySharedRoomEdit');##
                        Route::rule('del', '/del')->name('propertyEnergySharedRoomDel');##
                        Route::rule('detail', '/detail')->name('propertyEnergySharedRoomDetail');##
                    })->prefix('property.energy.EnergySharedRoom');## 公摊方案房间关联
                });
            });
            # 能耗管理 end
            ##工单管理 ADD
            Route::group('repair', function () {
                Route::group('cate', function () {
                    Route::get('list', '/list')->name('propertyRepairCateList');##
                    Route::rule('add', '/add')->name('propertyRepairCateAdd');##
                    Route::rule('edit', '/edit')->name('propertyRepairCateEdit');##
                    Route::rule('del', '/del')->name('propertyRepairCateDel');##
                    Route::rule('detail', '/detail')->name('propertyRepairCateDetail');##
                })->prefix('property.repair.RepairCate');
                Route::group('order', function () {
                    Route::get('list', '/list')->name('propertyRepairOrderList');## 全部
                    Route::get('awaitList', '/awaitList')->name('propertyRepairOrderAwaitList');## 待处理
                    Route::get('inProcessList', '/inProcessList')->name('propertyRepairOrderInProcessList');## 处理中
                    Route::get('finishList', '/finishList')->name('propertyRepairOrderFinishList');## 己完结
                    Route::get('cancelList', '/cancelList')->name('propertyRepairOrderCancelList');## 己取消
                    Route::rule('add', '/add')->name('propertyRepairOrderAdd');##创建
                    Route::rule('edit', '/edit')->name('propertyRepairOrderEdit');##编辑
                    Route::rule('del', '/del')->name('propertyRepairOrderDel');##删除
                    Route::rule('allot', '/allot')->name('propertyRepairOrderAllot');##分配
                    Route::rule('handle', '/handle')->name('propertyRepairOrderHandle');## 处理
                    Route::rule('cancel', '/cancel')->name('propertyRepairOrderCancel');## 取消
                    Route::rule('detail', '/detail')->name('propertyRepairOrderDetail');##详情
                    Route::rule('logs', '/logs')->name('propertyRepairOrderLogList');##日志
                })->prefix('property.repair.RepairOrder');
            });
            ##工单管理 END
            ##巡检记录 add
            Route::group('property', function () {
                Route::group('site', function () {
                    Route::get('list', '/list')->name('propertyInspectionSiteList');##
                    Route::rule('add', '/add')->name('propertyInspectionSiteAdd');##
                    Route::rule('edit', '/edit')->name('propertyInspectionSiteEdit');##
                    Route::post('del', '/del')->name('propertyInspectionSiteDel');##
                    Route::rule('detail', '/detail')->name('propertyInspectionSiteDetail');##
                })->prefix('property.inspection.InspectionSite');
                Route::group('log', function () {
                    Route::get('list', '/list')->name('propertyInspectionLogList');##
                    Route::rule('add', '/add')->name('propertyInspectionLogAdd');##
                    Route::rule('edit', '/edit')->name('propertyInspectionLogEdit');##
                    Route::post('del', '/del')->name('propertyInspectionLogDel');##
                    Route::rule('detail', '/detail')->name('propertyInspectionLogDetail');##
                })->prefix('property.inspection.InspectionLog');
            });
            ##巡检记录 end
            ## 充电桩管理 add
            Route::group('piles', function () {
                Route::group('basic', function () {
                    Route::get('list', '/list')->name('propertyPilesBasicList'); ##
                    Route::rule('add', '/add')->name('propertyPilesBasicAdd');##
                    Route::rule('edit', '/edit')->name('propertyPilesBasicEdit');##
                    Route::post('del', '/del')->name('propertyPilesBasicDel');##
                    Route::rule('detail', '/detail')->name('propertyPilesBasicDetail');
                    Route::get('pilesLog', '/pilesLog')->name('propertyPilesBasicLog');##
                    Route::post('stopCharge', '/stopCharge')->name('propertyPilesBasicStopCharge');##停止充电
                    Route::post('startCharge', '/startCharge')->name('propertyPilesBasicStartCharge');##开启充电
                })->prefix('property.piles.PilesBasic');
                Route::group('order', function () {
                    Route::get('list', '/list')->name('propertyPilesOrderList'); ##
                    Route::rule('add', '/add')->name('propertyPilesOrderAdd');##
                    Route::rule('edit', '/edit')->name('propertyPilesOrderEdit');##
                    Route::post('del', '/del')->name('propertyPilesOrderDel');##
                    Route::get('detail', '/detail')->name('propertyPilesOrderDetail'); ##
                    Route::rule('refund', '/refund')->name('propertyPilesOrderRefund'); ##退款
                })->prefix('property.piles.PilesOrder');
                Route::group('plan', function () {
                    Route::get('list', '/list')->name('propertyPilesPlanList'); ##
                    Route::rule('add', '/add')->name('propertyPilesPlanAdd');##
                    Route::rule('edit', '/edit')->name('propertyPilesPlanEdit');##
                    Route::post('del', '/del')->name('propertyPilesPlanDel');##
                    Route::get('detail', '/detail')->name('propertyPilesPlanDetail'); ##
                })->prefix('property.piles.PilesPlan');
                Route::group('faulty', function () {
                    Route::get('list', '/list')->name('propertyPilesFaultyLogList'); ##故障列表
                    Route::rule('handle', '/handle')->name('propertyPilesFaultyLogHandle');##处理故障
                    Route::post('del', '/del')->name('propertyPilesFaultyLogDel'); ##删除故障
                })->prefix('property.piles.PilesFaultyLog');
            });
            ## 充电桩管理 end
            ## 自助洗车管理 add
            Route::group('carwash', function () {
                Route::group('store', function () {
                    Route::get('list', '/list')->name('propertyCarwashStoreList'); ##
                    Route::rule('add', '/add')->name('propertyCarwashStoreAdd');##
                    Route::rule('edit', '/edit')->name('propertyCarwashStoreEdit');##
                    Route::post('del', '/del')->name('propertyCarwashStoreDel');##
                    Route::get('logs', '/logs')->name('propertyCarwashStoreLog'); ##
                    Route::get('detail', '/detail')->name('propertyCarwashStoreDetail'); ##
                })->prefix('property.carwash.CarwashStore');
                Route::group('label', function () {
                    Route::get('list', '/list')->name('propertyCarwashLabelList');
                    Route::rule('add', '/add')->name('propertyCarwashLabelAdd');
                    Route::rule('edit', '/edit')->name('propertyCarwashLabelEdit');
                    Route::rule('del', '/del')->name('propertyCarwashLabelDel');
                    Route::rule('detail', '/detail')->name('propertyCarwashLabelDetail');
                })->prefix('property.carwash.CarwashLabel');
            });
            ## 自助洗车管理 end
            ## 停车系统管理 add
            Route::group('parking', function () {
                Route::group('iot', function () {
                    Route::get('list', '/list')->name('propertyParkingIotList'); ##
                    Route::rule('add', '/add')->name('propertyParkingIotAdd');##
                    Route::rule('edit', '/edit')->name('propertyParkingIotEdit');##
                    Route::post('del', '/del')->name('propertyParkingIotDel');##
                    Route::get('logs', '/logs')->name('propertyParkingIotLog'); ##
                    Route::get('detail', '/detail')->name('propertyParkingIotDetail'); ##
                })->prefix('property.parking.ParkingIot');
                Route::group('order', function () {
                    Route::get('list', '/list')->name('propertyParkingOrderList');
                    Route::rule('add', '/add')->name('propertyParkingOrderAdd');
                    Route::rule('edit', '/edit')->name('propertyParkingOrderEdit');
                    Route::rule('del', '/del')->name('propertyParkingOrderDel');
                    Route::rule('detail', '/detail')->name('propertyParkingOrderDetail');
                })->prefix('property.parking.ParkingOrder');
            });
            ## 停车系统管理 end
            ## 办公管理 add
            Route::group('approval', function () {
                Route::group('config', function () {
                    Route::get('list', '/list')->name('propertyApprovalConfigList'); ##
                    Route::rule('add', '/add')->name('propertyApprovalConfigAdd');##
                    Route::rule('edit', '/edit')->name('propertyApprovalConfigEdit');##
                    Route::post('del', '/del')->name('propertyApprovalConfigDel');##
                    Route::get('detail', '/detail')->name('propertyApprovalConfigDetail'); ##
                })->prefix('property.approval.ApprovalConfig');
                Route::group('flow', function () {
                    Route::get('isubmitList', '/isubmitList')->name('propertyApprovalFlowSubmitList'); ## 我提交的列表
                    Route::rule('isubmitEdit', '/isubmitEdit')->name('propertyApprovalFlowSubmitEdit');## 编辑我提交的
                    Route::post('isubmitDel', '/isubmitDel')->name('propertyApprovalFlowSubmitDel');## 删除我提交的
                    Route::post('printInfo', '/printInfo')->name('propertyApprovalFlowPrint'); ## 打印
                })->prefix('property.approval.ApprovalFlow');
                Route::group('receives', function () {
                    Route::get('detail', '/detail')->name('propertyApprovalReceivesSubmitDetail'); ## 我提交的详情
                    Route::get('copyItToMe', '/copyItToMe')->name('propertyApprovalReceivesCopyItToMeList'); ## 抄送至我的
                    Route::get('stayMyApproval', '/stayMyApproval')->name('propertyApprovalReceivesStayMyApprovalList'); ## 待我审批的
                    Route::rule('approvalSubmit', '/approvalSubmit')->name('propertyApprovalReceivesApprovalSubmitData'); ## 审批
                    Route::get('readApproval', '/readApproval')->name('propertyApprovalReceivesApprovalReadInfo'); ## 阅读
                })->prefix('property.approval.ApprovalReceives');
            });## 办公管理 end

            ## 工作汇报 add
            Route::group('work', function () {
                Route::group('cate', function () {
                    Route::get('list', '/list')->name('propertyWorkCateList'); ##
                    Route::rule('add', '/add')->name('propertyWorkCateAdd');##
                    Route::rule('edit', '/edit')->name('propertyWorkCateEdit');##
                    Route::post('del', '/del')->name('propertyWorkCateDel');##
                    Route::get('detail', '/detail')->name('propertyWorkCateDetail'); ##
                })->prefix('property.work.WorkCate');
                Route::group('report', function () {
                    Route::get('workbenchIndex', '/workbenchIndex')->name('propertyUserWorkbenchIndex'); ## 我提交的报告列表
                    Route::get('isubmitList', '/isubmitList')->name('propertyWorkReportSubmitList'); ## 我提交的报告列表
                    Route::rule('submitAdd', '/submitAdd')->name('propertyWorkReportSubmitAdd');## 提交入口
                    Route::rule('edit', '/edit')->name('propertyWorkReportSubmitEdit');## 编辑我提交的
                    Route::post('del', '/del')->name('propertyAWorkReportSubmitDel');## 删除我提交的
                    Route::get('detail', '/detail')->name('propertyWorkReportSubmitDetail'); ## 我提交的详情
                    Route::get('reportToMe', '/reportToMe')->name('propertyWorkReportReportToMeList'); ## 汇报至我的
                    Route::get('readReport', '/readReport')->name('propertyWorkReportReportReadInfo'); ## 阅读报告
                })->prefix('property.work.WorkReport');
                Route::group('expend_apply', function () {
                    Route::rule('expendApplyAdd', '/expendApplyAdd')->name('propertyWorkExpendApplyAdd');## 报销申请
                    Route::post('expendApplyEdit', '/expendApplyEdit')->name('propertyWorkExpendApplyEdit');## 报销编辑

                })->prefix('property.work.WorkExpendApply');
            });## 工作汇报 end


        })->middleware(\app\http\middleware\property\CheckAuth::class);
        ## 验证权限 end
        ## 公共接口
        Route::group('property/common', function () {
            Route::get('getFloorData', '/getFloorData')->name('propertyGetFloorData');## 楼层数据
            Route::get('getRoomData', '/getRoomData')->name('propertyGetRoomData');##房间数据
        })->prefix('common.Room');
    })->middleware(\app\http\middleware\property\CheckLogin::class);

    ##  miss路由
    Route::miss(function () {
        return view('property/error/404');
    });
};

if (env('MULTI_DOMAIN_MODE', false)) {
    Route::domain(env('property_URL'), $propertyRoute)->prefix('property.');  ##  独立域名访问
} else {
    Route::group(env('property_URL') ?: 'property', $propertyRoute)->prefix('property.');  ##  单域名访问
}